
package main
 
import (
	"fmt"
	"context"
	"github.com/micro/go-micro"
	proto "my_micro/greeter"
)

func main() {
	service := micro.NewService(
                micro.Name("greeter"),
                micro.Version("latest"),
    )

    service.Init()

    greeter := proto.NewGreeterService("greeter", service.Client())

    rsp, err := greeter.Hello(context.TODO(), &proto.HelloRequest{Name: "res"})

    if err != nil {
    	fmt.Println(err)
    }

    fmt.Println(rsp.Greeting)
}